<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
	<script>
		  var timer;
			var i=0;
			timer=setTimeout(function(){
				console.log(++i)
			},2000)
			clearTimeout(timer)
			//延迟可以转换成定时 定时也可以转换成延时  
	</script>
</html>
